LOCAL_PATH:=$(call my-dir)

# Link to libX11
include $(CLEAR_VARS)
LOCAL_MODULE := libX11
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXmu
include $(CLEAR_VARS)
LOCAL_MODULE := libXmu
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libSM
include $(CLEAR_VARS)
LOCAL_MODULE := libSM
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libICE
include $(CLEAR_VARS)
LOCAL_MODULE := libICE
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXext
include $(CLEAR_VARS)
LOCAL_MODULE := libXext
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXpm
include $(CLEAR_VARS)
LOCAL_MODULE := libXpm
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Link to libXt
include $(CLEAR_VARS)
LOCAL_MODULE := libXt
LOCAL_SRC_FILES := ../../$(LOCAL_MODULE)/libs/$(TARGET_ARCH_ABI)/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../$(LOCAL_MODULE)/include
include $(PREBUILT_SHARED_LIBRARY)

# Now compile the stuff
include $(CLEAR_VARS)

LOCAL_MODULE:=libXaw

LOCAL_SRC_FILES := \
	Actions.c \
	AllWidgets.c \
	AsciiSink.c \
	AsciiSrc.c \
	AsciiText.c \
	Box.c \
	Command.c \
	Converters.c \
	Dialog.c \
	DisplayList.c \
	Form.c \
	Grip.c \
	Label.c \
	List.c \
	MenuButton.c \
	MultiSrc.c \
	MultiSink.c \
	OS.c \
	Paned.c \
	Panner.c \
	Pixmap.c \
	Porthole.c \
	Private.h \
	Repeater.c \
	Scrollbar.c \
	Simple.c \
	SimpleMenu.c \
	Sme.c \
	SmeBSB.c \
	SmeLine.c \
	StripChart.c \
	Text.c \
	TextSink.c \
	TextSrc.c \
	TextAction.c \
	TextPop.c \
	TextTr.c \
	Toggle.c \
	Tree.c \
	Vendor.c \
	Viewport.c \
	XawIm.c \
	XawInit.c \
	XawI18n.c \
	XawI18n.h
#	Tip.c \

LOCAL_SHARED_LIBRARIES:=\
	libX11 libXmu libSM libICE libXext libXpm libXt

include ../libX11/libX11.mk

LOCAL_CFLAGS += \
	-DISC30 \
	-DOLDXAW

APP_OPTIM := debug

include $(BUILD_SHARED_LIBRARY)
